/**
 * 数组
 *
 * @author Kevin
 * @date 2018-10-10
 */
public class Array {

    private int[] data;
    private int size;

    public Array() {
        this(10);
    }

    public Array(int capacity) {
        data = new int[capacity];
        size = 0;
    }

    /**
     * 获取数组的容量
     */
    public int getCapacity() {
        return data.length;
    }

    /**
     * 获取数组中元素的个数
     */
    public int getSize() {
        return size;
    }

    /**
     * 数组是否为空
     */
    public boolean isEmpty() {
        return size == 0;
    }

}
